package API.RegexAPI.Test;

import java.util.Scanner;

public class LandlinePhoneNumber {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter Phone Number: ");
        String phoneNumber = sc.nextLine();
        if(phoneNumber.matches("0\\d{2,3}-?\\d{6,8}")){
            System.out.println("Valid Phone Number");
        } else {
            System.out.println("Invalid Phone Number");
        }
    }
}
